<?php


namespace app\index\controller;


use app\common\model\Cate;
use app\common\model\Appoint as model;
use think\Request;

class Appoint extends Base
{
    public function index()
    {
        $cate = Cate::all();
        $plan_time = get_arr(model::$plan_time);

        $this->assign('plan_time', $plan_time);
        $this->assign('web_title', '预约试驾');
        $this->assign('cate', $cate);
        return $this->fetch();
    }

    public function create(Request $request)
    {
        $post = $request->post();
        $r = model::create($post);
        return apiReturnSuc($r);
    }
}